package com.ehotting.mqbd.core.config;

import com.ehotting.mqbd.core.mq.consumer.MessageConsumer;
import com.ehotting.mqbd.core.mq.MessageProducer;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import java.util.List;

@Configuration
@RefreshScope
@Component
@ConfigurationProperties(prefix = "mq")
public class MqbdCorePropertyConfig {

    private MessageProducer.MessageProducerParam producer;

    private MessageConsumer.MessageConsumerParam consumer;

    private boolean isClientSend=true;
    private boolean isSolverSend=true;
    private List<String> moduleList;

    public MessageConsumer.MessageConsumerParam getConsumer() {
        return consumer;
    }

    public void setConsumer(MessageConsumer.MessageConsumerParam consumer) {
        this.consumer = consumer;
    }

    public MessageProducer.MessageProducerParam getProducer() {
        return producer;
    }

    public void setProducer(MessageProducer.MessageProducerParam producer) {
        this.producer = producer;
    }


    public boolean isClientSend() {
        return isClientSend;
    }

    public void setClientSend(boolean clientSend) {
        isClientSend = clientSend;
    }

    public boolean isSolverSend() {
        return isSolverSend;
    }

    public void setSolverSend(boolean solverSend) {
        isSolverSend = solverSend;
    }

    public List<String> getModuleList() {
        return moduleList;
    }

    public void setModuleList(List<String> moduleList) {
        this.moduleList = moduleList;
    }
}